package assignment

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    request {
        method 'POST'
        url value(consumer("api/v2/tasks/\\d+/assignments/\\d+/quizzes"),
                producer("api/v2/tasks/1/assignments/1/quizzes"))
        headers {
            contentType(applicationJsonUtf8())
            header('id', 1)
        }
        body([
                1,2,3
        ])
        bodyMatchers {
            jsonPath('$.[*]', byRegex(number()))
        }
    }
    response {
        status 204
    }
}